package android.tusnotas.parser.folders;

import android.tusnotas.beans.Course;
import android.tusnotas.beans.File;
import android.tusnotas.beans.Folder;
import android.tusnotas.beans.Instance;
import android.tusnotas.beans.News;

import com.thoughtworks.xstream.XStream;

public class FoldersXStream extends XStream{ 
	public FoldersXStream(){
		//Course Configuration
		this.aliasField("Clases", Instance.class, "courses");
		this.aliasType("Clase", Course.class);
		this.aliasField("NumeroAula", Course.class, "classroom");
		this.aliasField("NombreMateria", Course.class, "name");
		this.aliasField("DiasCursada", Course.class, "days");
		this.aliasField("Horario", Course.class, "timetable");
		this.aliasField("FechaExamen", Course.class, "examenDate");
		this.aliasField("Asistencia", Course.class, "attendance");
		this.aliasField("IDAula", Course.class, "idAula");
		this.aliasField("Novedades", Course.class, "newsList");
		this.aliasField("Carpetas", Course.class, "folders");
		this.aliasField("Grupo", Course.class, "group");
		
		//Grade Configuration
		this.aliasField("Notas", Course.class, "grades");	
		
		//News Configuration
		this.aliasField("Novedades", Course.class, "newsList");
		this.aliasType("Novedad", News.class);
		this.aliasField("Titulo", News.class, "title");
		this.aliasField("Fecha", News.class, "date");
		this.aliasField("Descripcion", News.class, "content");

		//Folder Configuration
		this.aliasField("Carpetas", Course.class, "folders");
		this.aliasType("Carpeta", Folder.class);
		this.aliasField("Nombre", Folder.class, "name");

		//File Configuration
		this.aliasField("Archivos", Folder.class, "files");
		this.aliasType("Archivo", File.class);
		this.aliasField("ID", File.class, "id");
		this.aliasField("Nombre", File.class, "name");
		this.aliasField("Link", File.class, "link");
		this.aliasField("Extension", File.class, "extension");
		this.aliasField("Size", File.class, "size");
		this.aliasField("Fecha", File.class, "date");

	}
}
